/*
 +----------------------------------------------------------------------
 + Title        : 推荐接口
 + Author       : huwl
 + Version      : 1.0.0
 + Initial-Time : 2023-07-08
 + Last-time    : 这个文件最后修改的时间 + 修改人的名称
 + Desc         : 推荐接口
 +----------------------------------------------------------------------
*/
import type { GoodsListResult } from '@/types/goods'
import type { QueryRecommendListParams } from '@/types/recommend'
import { http } from '@/utils/httpRequest'


/**
 * 获取推荐
 * @param QueryRecommendListParams params -----------------请求参数
 * 包含以下数据
 *  string is_new -----------------------------------------是否新品
 *  string is_hot -----------------------------------------是否热门
 *  number page -------------------------------------------页码
 *  number pageSize ---------------------------------------条数
 *
 * return json
 * author huwl
 */
export const reqGetRecommendAPI = (params: QueryRecommendListParams) => {
  return http<GoodsListResult>({
    method: 'GET',
    url: 'goods/search',
    data: params
  })
}